#ifndef WF_DRAWLINEFREE_H
#define WF_DRAWLINEFREE_H

#include "pf_actioninterface.h"
#include "pf_polyline.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw freehand lines.
 *
 */
class GUI_EXPORT WF_DrawLineFree : public PF_ActionInterface {
	Q_OBJECT
public:
    WF_DrawLineFree(PF_Container& container,
                          PF_GraphicView& graphicView);
    ~WF_DrawLineFree();

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    virtual void trigger();
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mousePressEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    PF_Vector vertex;
    PF_Polyline* polyline;
};

#endif
